import request from '@/utils/request'

export function listCatUserGiftList(id) {
  return request({
    url: '/system/catUserAccount/giftList/' + id,
    method: 'get'
  })
}

// 查询用户注册的账号列表
export function listCatUserAccount(query) {
  return request({
    url: '/system/catUserAccount/list',
    method: 'get',
    params: query
  })
}

// 查询用户注册的账号详细
export function getCatUserAccount(id) {
  return request({
    url: '/system/catUserAccount/' + id,
    method: 'get'
  })
}

export function getCatUserAccountInfo(id) {
  return request({
    url: '/system/catUserAccount/info/' + id,
    method: 'get'
  })
}

// 新增用户注册的账号
export function addCatUserAccount(data) {
  return request({
    url: '/system/catUserAccount',
    method: 'post',
    data: data
  })
}

// 修改用户注册的账号
export function updateCatUserAccount(data) {
  return request({
    url: '/system/catUserAccount',
    method: 'put',
    data: data
  })
}

// 删除用户注册的账号
export function delCatUserAccount(id) {
  return request({
    url: '/system/catUserAccount/' + id,
    method: 'delete'
  })
}

// 导出用户注册的账号
export function exportCatUserAccount(query) {
  return request({
    url: '/system/catUserAccount/export',
    method: 'get',
    params: query
  })
}

export function updateByNumbers(data) {
  return request({
    url: '/system/catUserAccount/updateByNumbers',
    method: 'post',
    data: data
  })
}
export function updateByStatus(data) {
  return request({
    url: '/system/catUserAccount/updateByStatus',
    method: 'post',
    data: data
  })
}